﻿using System.Collections;
using System.Collections.Generic;
using UnityEngine;
using UnityEngine.Audio;

public class Audio_Background : Audio_Basic
{
    protected override void onMusicEnd()
    {
        if (now == count - 1)
        {
            now = 0;
            audioSource.clip = musics[0];
            audioSource.Play();
        }
        else
        {
            now++;
            audioSource.clip = musics[now];
            audioSource.Play();
        }
    }
}
